//
//  MyNetworking.h
//  装13小视频
//
//  Created by Bensn on 2017/3/11.
//  Copyright © 2017年 change360. All rights reserved.
//

#import "AFNetworking/AFNetworking.h"

//请求成功回调block
typedef void (^requestSuccessBlock)(NSDictionary *dic);

//请求失败回调block
typedef void (^requestFailureBlock)(NSError *error);

//请求方法define
typedef enum {
    GET,
    POST,
    PUT,
    DELETE,
    HEAD
} HTTPMethod;

//@property (nonatomic,strong) AFHTTPSessionManager *netManager;
//@property (strong, nonatomic) UIWindow *window;

@interface MyNetworking : AFHTTPSessionManager
+ (instancetype) sharedManager;


//登录
- (void) logInWithUserName:(NSString *)userName password:(NSString *)password WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//注册
- (void) registerWithUserName:(NSString *)userName password:(NSString *)password WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//忘记密码
- (void) forgetPasswordWithUserName:(NSString *)userName password:(NSString *)password WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//获取城市分类
- (void) obtainCityClassWithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//获取推荐视频列表
- (void) getrecommendvideoPage:(NSInteger)page WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//获取个人资料
-(void)getPersonInfo:(NSInteger)userID token:(NSString *)token logID:(NSInteger )logID WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;
//上传个人资料 
-(void)upPersonBaseInfo :(NSInteger )userID token:(NSString *)token true_name:(NSString *)true_name nick:(NSString *)nick age:(NSInteger )age birthday:(NSString *)birthday gender:(NSInteger )gender WithSuccessBlock:(requestSuccessBlock)success WithFailurBlock:(requestFailureBlock)failure;



@end
